<?php


namespace App\Support\Time;


class Time
{
    private static $now;

    private static $dealTime;

    public static function now()
    {
        self::$dealTime = time();
        return new self();
    }

    public function toDate()
    {
        return date('Y-m-d', self::$dealTime);
    }

    public function toDateTime()
    {
        return date('Y-m-d H:i:s',self::$dealTime);
    }

    public function timestamp()
    {
        return self::$dealTime;
    }

}